package dao

import (
	"time"
)

// 这是 LiOrder 的全局公开dao对象
var LiOrderDao = liOrderDao{}

// 这是 li_order表 的实体类
type LiOrder struct {
	Id                        int       `json:"id" form:"id" v:"id"`                                                                                  // ID
	CreateBy                  string    `json:"create_by" form:"create_by" v:"create_by"`                                                             // 创建者
	CreateTime                time.Time `json:"create_time" form:"create_time" v:"create_time"`                                                       // 创建时间
	DeleteFlag                bool      `json:"delete_flag" form:"delete_flag" v:"delete_flag" gm:"delete_flag"`                                      // 删除标志 true/false 删除/未删除
	UpdateBy                  string    `json:"update_by" form:"update_by" v:"update_by"`                                                             // 更新者
	UpdateTime                time.Time `json:"update_time" form:"update_time" v:"update_time"`                                                       // 更新时间
	CanReturn                 bool      `json:"can_return" form:"can_return" v:"can_return"`                                                          // 订单是否支持原路退回
	CancelReason              string    `json:"cancel_reason" form:"cancel_reason" v:"cancel_reason"`                                                 // 订单取消原因
	ClientType                string    `json:"client_type" form:"client_type" v:"client_type"`                                                       // 订单来源
	CompleteTime              time.Time `json:"complete_time" form:"complete_time" v:"complete_time"`                                                 // 完成时间
	ConsigneeAddressIdPath    string    `json:"consignee_address_id_path" form:"consignee_address_id_path" v:"consignee_address_id_path"`             // 地址id &#39;,&#39;分割
	ConsigneeAddressPath      string    `json:"consignee_address_path" form:"consignee_address_path" v:"consignee_address_path"`                      // 地址名称  &#39;,&#39;分割"
	ConsigneeDetail           string    `json:"consignee_detail" form:"consignee_detail" v:"consignee_detail"`                                        // 详细地址
	ConsigneeMobile           string    `json:"consignee_mobile" form:"consignee_mobile" v:"consignee_mobile"`                                        // 收件人手机
	ConsigneeName             string    `json:"consignee_name" form:"consignee_name" v:"consignee_name"`                                              // 收件人姓名
	DeliverStatus             string    `json:"deliver_status" form:"deliver_status" v:"deliver_status"`                                              // 货运状态
	DiscountPrice             float64   `json:"discount_price" form:"discount_price" v:"discount_price"`                                              // 优惠的金额
	FlowPrice                 float64   `json:"flow_price" form:"flow_price" v:"flow_price"`                                                          // 总价格
	FreightPrice              float64   `json:"freight_price" form:"freight_price" v:"freight_price"`                                                 // 运费
	GoodsNum                  int       `json:"goods_num" form:"goods_num" v:"goods_num"`                                                             // 商品数量
	GoodsPrice                float64   `json:"goods_price" form:"goods_price" v:"goods_price"`                                                       // 商品价格
	LogisticsCode             string    `json:"logistics_code" form:"logistics_code" v:"logistics_code"`                                              // 物流公司CODE
	LogisticsName             string    `json:"logistics_name" form:"logistics_name" v:"logistics_name"`                                              // 物流公司名称
	LogisticsNo               string    `json:"logistics_no" form:"logistics_no" v:"logistics_no"`                                                    // 发货单号
	LogisticsTime             time.Time `json:"logistics_time" form:"logistics_time" v:"logistics_time"`                                              // 送货时间
	MemberId                  string    `json:"member_id" form:"member_id" v:"member_id"`                                                             // 会员ID
	MemberName                string    `json:"member_name" form:"member_name" v:"member_name"`                                                       // 用户名
	NeedReceipt               bool      `json:"need_receipt" form:"need_receipt" v:"need_receipt"`                                                    // 是否需要发票
	OrderStatus               string    `json:"order_status" form:"order_status" v:"order_status"`                                                    // 订单状态
	OrderType                 string    `json:"order_type" form:"order_type" v:"order_type"`                                                          // 订单类型
	ParentOrderSn             string    `json:"parent_order_sn" form:"parent_order_sn" v:"parent_order_sn"`                                           // 是否为其他订单下的订单，如果是则为依赖订单的sn，否则为空
	PayOrderNo                string    `json:"pay_order_no" form:"pay_order_no" v:"pay_order_no"`                                                    // 支付方式返回的交易号
	PayStatus                 string    `json:"pay_status" form:"pay_status" v:"pay_status"`                                                          // 付款状态
	PaymentMethod             string    `json:"payment_method" form:"payment_method" v:"payment_method"`                                              // 支付方式
	PaymentTime               time.Time `json:"payment_time" form:"payment_time" v:"payment_time"`                                                    // 支付时间
	PriceDetail               string    `json:"price_detail" form:"price_detail" v:"price_detail"`                                                    // 价格详情
	PromotionId               string    `json:"promotion_id" form:"promotion_id" v:"promotion_id"`                                                    // 是否为某订单类型的订单，如果是则为订单类型的id，否则为空
	Remark                    string    `json:"remark" form:"remark" v:"remark"`                                                                      // 买家订单备注
	StoreId                   string    `json:"store_id" form:"store_id" v:"store_id"`                                                                // 店铺ID
	StoreName                 string    `json:"store_name" form:"store_name" v:"store_name"`                                                          // 店铺名称
	Sn                        string    `json:"sn" form:"sn" v:"sn"`                                                                                  // 订单编号
	TradeSn                   string    `json:"trade_sn" form:"trade_sn" v:"trade_sn"`                                                                // 交易编号 关联Trade
	Weight                    float64   `json:"weight" form:"weight" v:"weight"`                                                                      // 订单商品总重量
	QrCode                    string    `json:"qr_code" form:"qr_code" v:"qr_code"`                                                                   // 提货码
	UpdatePrice               float64   `json:"update_price" form:"update_price" v:"update_price"`                                                    // 修改价格
	DistributionId            string    `json:"distribution_id" form:"distribution_id" v:"distribution_id"`                                           // 分销员ID
	DeliveryMethod            string    `json:"delivery_method" form:"delivery_method" v:"delivery_method"`                                           // 配送方式
	UsePlatformMemberCouponId string    `json:"use_platform_member_coupon_id" form:"use_platform_member_coupon_id" v:"use_platform_member_coupon_id"` // 使用的平台会员优惠券id
	UseStoreMemberCouponIds   string    `json:"use_store_member_coupon_ids" form:"use_store_member_coupon_ids" v:"use_store_member_coupon_ids"`       // 使用的店铺会员优惠券id(,区分)
	ReceivableNo              string    `json:"receivable_no" form:"receivable_no" v:"receivable_no"`
}

// 注意:这是 LiOrder 的私有dao对象
type liOrderDao struct {
	Insert func(arg LiOrder) int     //插入一条记录
	Update func(arg LiOrder) int     //更新一条记录
	Delete func(arg LiOrder) int     //删除一条记录
	Select func(arg LiOrder) LiOrder //获取一条记录
}
